<!DOCTYPE html>
<html   xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>首页</title>
    <script src="/js/jquery/jquery-3.4.0.min.js"></script>
    <script src="/js/common.js"></script>
    <script src="/layui/layui.js"></script>
    <link rel="stylesheet" href="/layui/css/layui.css">

    <script th:inline="javascript" type="text/javascript">
        layui.use('form', function(){
            var form = layui.form; //只有执行了这一步，部分表单元素才会自动修饰成功
            form.render();
        });X
        function test() {
        var params = {
            "id":"123",
            "name":"ceshi"
        };
        debugger;
      var rs =  sendDate("/user/test",JSON.stringify(params));
    }
    function add() {
            debugger;
            var data = {
                "name":'李四',
                "id":'15452124'
            }
        openDialog('user/userAdd',data);
    }
    </script>
</head>
<body>
<div>
    <table>
        <tr>
            <td>
                <button th : onclick="add()">添加</button>
                <!--<input th:id="add" type="button" th:value="添加" th onclick="add()">-->
            </td>
        </tr>
    </table>
</div>
<table border="1">
    <tr>
        <td colspan="3">
            <button  th:onclick="test()" >测试按钮</button>
        </td>

    </tr>
    <tr>
        <th>姓名</th>
        <th>编码</th>
        <th>邮箱</th>
        <th>手机</th>
        <th>密码</th>
        <th>编辑</th>
        <th>删除</th>
    </tr>
    <tr th:each="entries,stat:${users}">
        <td th:text="${entries['user_name']}"></td>
        <td th:text="${entries['user_code']}"></td>
        <td th:text="${entries['user_email']}"></td>
        <td th:text="${entries['user_phone']}"></td>
        <td th:text="${entries['user_password']}"></td>
        <td > <a href="@{query+?$'{entries['user_code']}'">编辑</a>  </td>
        <td> <a href="@{query+?$'{entries['user_code']}'">删除</a>  </td>
    </tr>
</table>


    <div style="text-align: right;vertical-align: bottom" >
        <button type="button" class="layui-btn layui-btn-primary layui-btn-radius">原始按钮</button>
        <button type="button" class="layui-btn layui-btn-radius">默认按钮</button>
        <button type="button" class="layui-btn layui-btn-normal layui-btn-radius">百搭按钮</button>
        <button type="button" class="layui-btn layui-btn-warm layui-btn-radius">暖色按钮</button>
        <button type="button" class="layui-btn layui-btn-danger layui-btn-radius">警告按钮</button>
        <button type="button" class="layui-btn layui-btn-disabled layui-btn-radius">禁用按钮</button>
    </div>




</body>
</html>